fix(upstream): look up unmodeled scoring drift by fingerprint, not capped list - #1903
Conversation
…pped list syncUnmodeledScoringConstantDrift scanned only the newest 50 drift reports, so an older unmodeled-constants row could be missed (duplicate opens, lost issue metadata, resolve no-ops). Query by the stable fingerprint directly. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Tip 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩 ✅ Gittensory review result - approve/merge recommendedReview updated: 2026-06-30 22:27:45 UTC
✅ Suggested Action - Approve/Merge
Review summary Nits — 3 non-blocking
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
… first updateUpstreamDriftReportIssue rewrites updatedAt, which put the row back inside listUpstreamDriftReports(50) and invalidated the regression. Seed issue metadata on upsert and re-age only after the update sync under test. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
getUpstreamDriftReportByFingerprintso drift sync can load a report by its stable fingerprint regardless of status.syncUnmodeledScoringConstantDriftfrom scanninglistUpstreamDriftReports(env, 50)to the fingerprint-keyed lookup, preventing duplicate open reports, lost issue metadata, and resolve no-ops when the row ages out of the recency window.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Issue creation is currently blocked for contributor accounts on the upstream repo; this is a focused correctness fix with regression tests.
Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥97% coverage of the lines AND branches you changed (aim for 98%+ on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
npm run test:ciruns in GitHub Actions; targeted vitest covered the new regression suite.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
N/A — backend drift-sync logic only.
Notes
Made with Cursor